// 办公管理模块类型定义

// 计划接口
export interface Plan {
  id: number
  title: string
  content: string
  type: number
  remind_type: number
  remind_time: string
  start_time: string
  end_time: string
  create_time: string
}

// 日程接口
export interface Schedule {
  id: number
  title: string
  content: string
  labor_type: number
  labor_time: number
  start_time: string
  end_time: string
  create_time: string
}

// 工作汇报接口
export interface Work {
  id: number
  types: number
  works: string
  file_ids: string
  start_date: string
  end_date: string
  create_time: string
  // 扩展字段
  from_name?: string
  to_unames?: string
  send_time?: string
  read_time?: string
  range_date?: string
}

// 工作汇报类型枚举
export enum WorkType {
  DAILY = 1,
  WEEKLY = 2,
  MONTHLY = 3,
}

// 工作汇报类型标签映射
export const WorkTypeMap: {
  [key in WorkType]: { label: string; type: string }
} = {
  [WorkType.DAILY]: { label: '日报', type: 'primary' },
  [WorkType.WEEKLY]: { label: '周报', type: 'success' },
  [WorkType.MONTHLY]: { label: '月报', type: 'warning' },
}

// 阅读状态枚举
export enum ReadStatus {
  UNREAD = 1,
  READ = 2,
}

// 阅读状态标签映射
export const ReadStatusMap: {
  [key in ReadStatus]: { label: string; type: string }
} = {
  [ReadStatus.UNREAD]: { label: '未读', type: 'danger' },
  [ReadStatus.READ]: { label: '已读', type: 'success' },
}
